<!DOCTYPE html>
<html lang="en" dir="ltr" style='font-family: "DejaVu Sans", arial, sans-serif;font-size: 16pt'>
<head>
<title>std::basic_string - cppreference.com</title>
<meta charset="UTF-8">
<meta name="generator" content="MediaWiki 1.21.2">
<link rel="shortcut icon" href="../../../favicon.ico">
<meta name="ResourceLoaderDynamicStyles" content="">
<script src="../../../common/startup_scripts.js"></script>
<script>if(window.mw){
mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"cpp/string/basic_string","wgTitle":"cpp/string/basic string","wgCurRevisionId":97050,"wgArticleId":1389,"wgIsArticle":true,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Pages with unreviewed LWG DR marker"],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"cpp/string/basic_string","wgRestrictionEdit":[],"wgRestrictionMove":[]});
}</script><script>if(window.mw){
mw.loader.implement("user.options",function(){mw.user.options.set({"ccmeonemails":0,"cols":80,"date":"default","diffonly":0,"disablemail":0,"disablesuggest":0,"editfont":"default","editondblclick":0,"editsection":0,"editsectiononrightclick":0,"enotifminoredits":0,"enotifrevealaddr":0,"enotifusertalkpages":1,"enotifwatchlistpages":0,"extendwatchlist":0,"externaldiff":0,"externaleditor":0,"fancysig":0,"forceeditsummary":0,"gender":"unknown","hideminor":0,"hidepatrolled":0,"imagesize":2,"justify":0,"math":1,"minordefault":0,"newpageshidepatrolled":0,"nocache":0,"noconvertlink":0,"norollbackdiff":0,"numberheadings":0,"previewonfirst":0,"previewontop":1,"quickbar":5,"rcdays":7,"rclimit":50,"rememberpassword":0,"rows":25,"searchlimit":20,"showhiddencats":0,"showjumplinks":1,"shownumberswatching":1,"showtoc":0,"showtoolbar":1,"skin":"cppreference2","stubthreshold":0,"thumbsize":2,"underline":2,"uselivepreview":0,"usenewrc":0,"watchcreations":0,"watchdefault":0,"watchdeletion":0,
"watchlistdays":3,"watchlisthideanons":0,"watchlisthidebots":0,"watchlisthideliu":0,"watchlisthideminor":0,"watchlisthideown":0,"watchlisthidepatrolled":0,"watchmoves":0,"wllimit":250,"variant":"en","language":"en","searchNs0":true,"searchNs1":false,"searchNs2":false,"searchNs3":false,"searchNs4":false,"searchNs5":false,"searchNs6":false,"searchNs7":false,"searchNs8":false,"searchNs9":false,"searchNs10":false,"searchNs11":false,"searchNs12":false,"searchNs13":false,"searchNs14":false,"searchNs15":false,"gadget-ColiruCompiler":1,"gadget-MathJax":1});;},{},{});mw.loader.implement("user.tokens",function(){mw.user.tokens.set({"editToken":"+\\","patrolToken":false,"watchToken":false});;},{},{});
/* cache key: mwiki1-mwiki_en_:resourceloader:filter:minify-js:7:9f05c6caceb9bb1a482b6cebd4c5a330 */
}</script>
<script>if(window.mw){
mw.loader.load(["mediawiki.page.startup","mediawiki.legacy.wikibits","mediawiki.legacy.ajax"]);
}</script>
<!--[if lt IE 7]><style type="text/css">body{behavior:url("/mwiki/skins/cppreference2/csshover.min.htc")}</style><![endif]-->
</head>
<body style='font-family: "DejaVu Sans", arial, sans-serif;font-size: 16pt;background-color: white' bgcolor="white">
        <!-- header -->
        <!-- /header -->
        <!-- content -->
        <div id="cpp-content-base" style="background-color:white" bgcolor="white">
            <div id="content" style="line-height:1.2em; position:static; margin:0; width:48.75em; padding-top:32px" width="48.75em">
                <a id="top"></a>
                <!-- firstHeading -->
                <h1 id="firstHeading" style="font-size: 32pt">
<span style="font-size: 22.4pt;line-height: 130%">std::</span>basic_string</h1>
                <!-- /firstHeading -->
                <!-- bodyContent -->
                <div id="bodyContent" style="line-height:1.2em; position:static">
                                        <!-- tagline -->
                    <!-- /tagline -->
                                        <!-- subtitle -->
                    <!-- /subtitle -->
                                                            <!-- bodycontent -->
                    <div id="mw-content-text" lang="en" dir="ltr">
<div style="display:inline-block; height:1.72em; left:0; position:absolute; top:0" height="1.72em">
<div style="-moz-box-sizing: border-box;background-origin: border-box;border-bottom: 1px solid silver;box-sizing: border-box;float: left;font-size: 14.4pt;height: 100%;padding-bottom: 0.3em;padding-top: 0.4em;background-image: url(skins/cppreference2/images/navbar-inv-tab.png);background-position: left bottom;background-repeat: no-repeat;width: 8px;border-bottom-width: 0" height="100%" width="8"> </div>
<div style="-moz-box-sizing: border-box;background-origin: border-box;border-bottom: 1px solid silver;box-sizing: border-box;float: left;font-size: 14.4pt;height: 100%;padding-bottom: 0.3em;padding-top: 0.4em;padding-left: 0.2em;padding-right: 0.2em" height="100%"><a href="../../cpp.html" title="cpp"> C++</a></div>
<div style="-moz-box-sizing: border-box;background-origin: border-box;border-bottom: 1px solid silver;box-sizing: border-box;float: left;font-size: 14.4pt;height: 100%;padding-bottom: 0.3em;padding-top: 0.4em;background-image: url(skins/cppreference2/images/navbar-tab.png);background-position: right bottom;background-repeat: no-repeat;width: 8px" height="100%" width="8"> </div>
<div style="-moz-box-sizing: border-box;background-origin: border-box;border-bottom: 1px solid silver;box-sizing: border-box;float: left;font-size: 14.4pt;height: 100%;padding-bottom: 0.3em;padding-top: 0.4em;padding-left: 0.2em;padding-right: 0.2em" height="100%"><a href="../string.html" title="cpp/string"> Strings library</a></div>
<div style="-moz-box-sizing: border-box;background-origin: border-box;border-bottom: 1px solid silver;box-sizing: border-box;float: left;font-size: 14.4pt;height: 100%;padding-bottom: 0.3em;padding-top: 0.4em;background-image: url(skins/cppreference2/images/navbar-tab.png);background-position: right bottom;background-repeat: no-repeat;width: 8px" height="100%" width="8"> </div>
<div style="-moz-box-sizing: border-box;background-origin: border-box;border-bottom: 1px solid silver;box-sizing: border-box;float: left;font-size: 14.4pt;height: 100%;padding-bottom: 0.3em;padding-top: 0.4em;padding-left: 0.2em;padding-right: 0.2em" height="100%"><strong style="font-weight:bold"><tt style='font-family:"DejaVu Sans Mono", courier, monospace'>std::basic_string</tt></strong></div>
<div style="-moz-box-sizing: border-box;background-origin: border-box;border-bottom: 1px solid silver;box-sizing: border-box;float: left;font-size: 14.4pt;height: 100%;padding-bottom: 0.3em;padding-top: 0.4em;background-image: url(skins/cppreference2/images/navbar-tab.png);background-position: right bottom;background-repeat: no-repeat;width: 8px;border-bottom-width: 0" height="100%" width="8"> </div>
</div>
<table style="background-color:transparent; border-spacing:0; display:block; padding:0.5em 0"><tbody>
<tr>
<td style="font-size: 12.8pt;line-height: 1em;padding: 0"> <div>Defined in header <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'><a href="../header/string.html" title="cpp/header/string">&lt;string&gt;</a></code>
 </div>
</td>
<td style="font-size: 12.8pt;line-height: 1em;padding: 0"></td>
<td style="font-size: 12.8pt;line-height: 1em;padding: 0"></td>
</tr>
<tr><td colspan="3" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="font-size: 16pt;padding: 0.3em 2em 0.2em 1em"> <div><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><span style="color:#00d">template</span><span style="color:#000080">&lt;</span> <br>
<p style="line-height:1.2em">    <span style="color:#00d">class</span> CharT, <br>
    <span style="color:#00d">class</span> Traits <span style="color:#000080">=</span> <a href="char_traits.html" style="color:#003080"><span>std::<span>char_traits</span></span></a><span style="color:#000080">&lt;</span>CharT<span style="color:#000080">&gt;</span>, <br>
    <span style="color:#00d">class</span> Allocator <span style="color:#000080">=</span> <a href="../memory/allocator.html" style="color:#003080"><span>std::<span>allocator</span></span></a><span style="color:#000080">&lt;</span>CharT<span style="color:#000080">&gt;</span><br>
</p>
<span style="color:#000080">&gt;</span> <span style="color:#00d">class</span> basic_string<span style="color:#008080">;</span></span></div>
</td>
<td> (1) </td>
<td style="padding-right: 0">  </td>
</tr>
<tr><td colspan="3" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="font-size: 16pt;padding: 0.3em 2em 0.2em 1em"> <div><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><span style="color:#00d">namespace</span> pmr <span style="color:#008000">{</span><br>
<p style="line-height:1.2em">    <span style="color:#00d">template</span> <span style="color:#000080">&lt;</span><span style="color:#00d">class</span> CharT, <span style="color:#00d">class</span> Traits <span style="color:#000080">=</span> <a href="char_traits.html" style="color:#003080"><span>std::<span>char_traits</span></span></a><span style="color:#000080">&lt;</span>CharT<span style="color:#000080">&gt;&gt;</span><br>
    <span style="color:#00d">using</span> basic_string <span style="color:#000080">=</span> std<span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span> CharT, Traits,<br>
                                            std<span style="color:#008080">::</span><span>polymorphic_allocator</span><span style="color:#000080">&lt;</span>CharT<span style="color:#000080">&gt;&gt;</span><br>
</p>
<span style="color:#008000">}</span></span></div>
</td>
<td> (2) </td>
<td> <span style="color: #008000;font-size: 12.8pt">(since C++17)</span> </td>
</tr>
<tr><td colspan="3" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="padding: 0"></td>
<td style="padding: 0"></td>
<td style="padding: 0"></td>
</tr>
</tbody></table>
<p style="line-height:1.2em">The class template <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>basic_string</code> stores and manipulates sequences of <a href="../language/types.html#Character_types" title="cpp/language/types"><tt style='font-family:"DejaVu Sans Mono", courier, monospace'><span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><span style="color:#00f">char</span></span></span></tt></a>-like objects, which are non-array objects of <a href="../concept/TrivialType.html" title="cpp/concept/TrivialType">trivial type</a>. The class is dependent neither on the character type nor on the nature of operations on that type. The definitions of the operations are supplied via the <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Traits</code> template parameter - a specialization of <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><a href="char_traits.html" title="cpp/string/char traits">std::char_traits</a></span> or a compatible traits class. <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Traits::char_type</code> and <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>CharT</code> must name the same type; otherwise the behavior is undefined. 
</p>
 <table style="background-color:transparent; border-collapse:collapse; border-spacing:0">
<tr>
<td style="padding:0.3em 0.2em; border:1px solid silver; border-right:none">
<p style="line-height:1.2em; margin-top:0; margin-bottom:0">The elements of a <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>basic_string</code> are stored contiguously, that is, for a basic_string <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>s</code>, <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><span style="color:#000040">&amp;</span><span style="color:#000040">*</span><span style="color:#008000">(</span>s.<span>begin</span><span style="color:#008000">(</span><span style="color:#008000">)</span> <span style="color:#000040">+</span> n<span style="color:#008000">)</span> <span style="color:#000080">==</span> <span style="color:#000040">&amp;</span><span style="color:#000040">*</span>s.<span>begin</span><span style="color:#008000">(</span><span style="color:#008000">)</span> <span style="color:#000040">+</span> n</span></span> for any n in <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>[0, s.size())</code>, or, equivalently, a pointer to <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>s[0]</code> can be passed to functions that expect a pointer to the first element of a <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>CharT[]</code> array.
</p>
</td>
<td style="padding:0.3em 0.2em"><span style="color: #008000;font-size: 12.8pt">(since C++11)</span></td>
</tr>
</table>
<p style="line-height:1.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>std::basic_string</code> satisfies the requirements of <a href="../concept/AllocatorAwareContainer.html" title="cpp/concept/AllocatorAwareContainer"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>AllocatorAwareContainer</code></a>, <a href="../concept/SequenceContainer.html" title="cpp/concept/SequenceContainer"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>SequenceContainer</code></a> <span style="margin:0; padding:0; border:1px solid silver"><span style="margin:0; padding:0">and <a href="../concept/ContiguousContainer.html" title="cpp/concept/ContiguousContainer"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>ContiguousContainer</code></a></span> <span style="margin:0; padding:0"><span style="color: #008000;font-size: 12.8pt">(since C++17)</span></span></span>
</p>
<p style="line-height:1.2em">Several typedefs for common character types are provided:
</p>
<table style="background-color:transparent; border-spacing:0; max-width:60em">

<tr>
<td colspan="2" style="font-size: 12.8pt;line-height: 1em;padding: 0"> <div>Defined in header <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>&lt;string&gt;</code> </div>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="font-weight: bold;line-height: 1.1em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap">  Type
</td>
<td style="font-weight: bold;line-height: 1.1em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap">  Definition
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::string</strong></span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">char</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::wstring</strong></span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">wchar_t</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::u16string</strong></span> <span style="color: #008000;font-size: 12.8pt">(C++11)</span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">char16_t</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::u32string</strong></span> <span style="color: #008000;font-size: 12.8pt">(C++11)</span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">char32_t</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::pmr::string</strong></span> <span style="color: #008000;font-size: 12.8pt">(C++17)</span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>pmr</span><span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">char</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::pmr::wstring</strong></span> <span style="color: #008000;font-size: 12.8pt">(C++17)</span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>pmr</span><span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">wchar_t</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::pmr::u16string</strong></span> <span style="color: #008000;font-size: 12.8pt">(C++17)</span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>pmr</span><span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">char16_t</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><strong style="font-weight:bold">std::pmr::u32string</strong></span> <span style="color: #008000;font-size: 12.8pt">(C++17)</span>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'>std<span style="color:#008080">::</span><span>pmr</span><span style="color:#008080">::</span><span>basic_string</span><span style="color:#000080">&lt;</span><span style="color:#00f">char32_t</span><span style="color:#000080">&gt;</span></span></span>
</td>
</tr>

</table>
<h3 style="padding:1.1em 0 0.2em 0.75em"><span id="Template_parameters">Template parameters</span></h3>
<table style="background-color:transparent; border-spacing:0">


<tr>
<td style='padding:0.5em 1em 0 0; vertical-align:top; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold; text-align:right; white-space:nowrap' valign="top" align="right">  CharT
</td>
<td style="padding:0.5em 1em 0 0; vertical-align:top" valign="top"> -
</td>
<td style="padding:0.5em 1em 0 0; vertical-align:top" valign="top">  character type
</td>
</tr>
<tr>
<td style='padding:0.5em 1em 0 0; vertical-align:top; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold; text-align:right; white-space:nowrap' valign="top" align="right">  Traits
</td>
<td style="padding:0.5em 1em 0 0; vertical-align:top" valign="top"> -
</td>
<td style="padding:0.5em 1em 0 0; vertical-align:top" valign="top">  traits class specifying the operations on the character type
</td>
</tr>
<tr>
<td style='padding:0.5em 1em 0 0; vertical-align:top; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold; text-align:right; white-space:nowrap' valign="top" align="right">  Allocator
</td>
<td style="padding:0.5em 1em 0 0; vertical-align:top" valign="top"> -
</td>
<td style="padding:0.5em 1em 0 0; vertical-align:top" valign="top">  <a href="../concept/Allocator.html" title="cpp/concept/Allocator"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator</code></a> type used to allocate internal storage
</td>
</tr>
</table>
<h3 style="padding:1.1em 0 0.2em 0.75em"><span id="Member_types">Member types</span></h3>
<table style="background-color:transparent; border-spacing:0; max-width:60em">

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="font-weight: bold;line-height: 1.1em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap">  Member type
</td>
<td style="font-weight: bold;line-height: 1.1em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap">  Definition
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>traits_type</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Traits</code>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>value_type</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>CharT</code>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>allocator_type</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator</code> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>size_type</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   <table style="background-color:transparent; border-collapse:collapse; border-spacing:0; display:inline-table">
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator::size_type</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(until C++11)</span></td>
</tr>
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><a href="../memory/allocator_traits.html" style="color:#003080"><span>std::<span>allocator_traits</span></span></a><span style="color:#000080">&lt;</span>Allocator<span style="color:#000080">&gt;</span><span style="color:#008080">::</span><span>size_type</span></span></span></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(since C++11)</span></td>
</tr>
</table> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>difference_type</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   <table style="background-color:transparent; border-collapse:collapse; border-spacing:0; display:inline-table">
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator::difference_type</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(until C++11)</span></td>
</tr>
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><a href="../memory/allocator_traits.html" style="color:#003080"><span>std::<span>allocator_traits</span></span></a><span style="color:#000080">&lt;</span>Allocator<span style="color:#000080">&gt;</span><span style="color:#008080">::</span><span>difference_type</span></span></span></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(since C++11)</span></td>
</tr>
</table> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>reference</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   <table style="background-color:transparent; border-collapse:collapse; border-spacing:0; display:inline-table">
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator::reference</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(until C++11)</span></td>
</tr>
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>value_type&amp;</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(since C++11)</span></td>
</tr>
</table> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>const_reference</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   <table style="background-color:transparent; border-collapse:collapse; border-spacing:0; display:inline-table">
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator::const_reference</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(until C++11)</span></td>
</tr>
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>const value_type&amp;</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(since C++11)</span></td>
</tr>
</table> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>pointer</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   <table style="background-color:transparent; border-collapse:collapse; border-spacing:0; display:inline-table">
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator::pointer</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(until C++11)</span></td>
</tr>
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><a href="../memory/allocator_traits.html" style="color:#003080"><span>std::<span>allocator_traits</span></span></a><span style="color:#000080">&lt;</span>Allocator<span style="color:#000080">&gt;</span><span style="color:#008080">::</span><span>pointer</span></span></span></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(since C++11)</span></td>
</tr>
</table> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>const_pointer</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   <table style="background-color:transparent; border-collapse:collapse; border-spacing:0; display:inline-table">
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>Allocator::const_pointer</code></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(until C++11)</span></td>
</tr>
<tr>
<td style="padding:0; border:none; border-right:none; padding-right:0.2em"><span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><a href="../memory/allocator_traits.html" style="color:#003080"><span>std::<span>allocator_traits</span></span></a><span style="color:#000080">&lt;</span>Allocator<span style="color:#000080">&gt;</span><span style="color:#008080">::</span><span>const_pointer</span></span></span></td>
<td style="padding:0; border:none"><span style="color: #008000;font-size: 12.8pt">(since C++11)</span></td>
</tr>
</table> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>iterator</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <a href="../concept/RandomAccessIterator.html" title="cpp/concept/RandomAccessIterator"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>RandomAccessIterator</code></a> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>const_iterator</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  Constant <a href="../concept/RandomAccessIterator.html" title="cpp/concept/RandomAccessIterator"><code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>RandomAccessIterator</code></a> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>reverse_iterator</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><a href="../iterator/reverse_iterator.html" style="color:#003080"><span>std::<span>reverse_iterator</span></span></a><span style="color:#000080">&lt;</span>iterator<span style="color:#000080">&gt;</span></span></span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>const_reverse_iterator</code>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  <span style="background-color:rgba(0, 0, 0, 0.031); border:1px solid #D6D6D6; border-radius:3px; display:inline-block; margin:0 2px; padding:0 2px" bgcolor="rgba(0, 0, 0, 0.031)"><span style='line-height:normal; white-space:nowrap; font-family:"DejaVu Sans Mono", courier, monospace'><a href="../iterator/reverse_iterator.html" style="color:#003080"><span>std::<span>reverse_iterator</span></span></a><span style="color:#000080">&lt;</span>const_iterator<span style="color:#000080">&gt;</span></span></span> </td>
</tr>
</table>
<h3 style="padding:1.1em 0 0.2em 0.75em"><span id="Member_functions">Member functions</span></h3>
<table style="background-color:transparent; border-spacing:0; max-width:60em">

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSans, "DejaVu Sans", arial, sans-serif; font-weight:normal' valign="middle"><a href="basic_string/basic_string.html" title="cpp/string/basic string/basic string"> <table><tr><td>(constructor)</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  constructs a <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>basic_string</code> <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSans, "DejaVu Sans", arial, sans-serif; font-weight:normal' valign="middle"><table><tr><td>(destructor)</td></tr></table></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">  destroys the string, deallocating internal storage if used <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span>
</td>
</tr>


<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator%3D.html" title="cpp/string/basic string/operator="> <table><tr><td>operator=</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   assigns values to the string  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/assign.html" title="cpp/string/basic string/assign"> <table><tr><td>assign</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">    assign characters to a string <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/get_allocator.html" title="cpp/string/basic string/get allocator"> <table><tr><td>get_allocator</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns the associated allocator  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>


<tr>
<td colspan="2"> <h5> <span id="Element_access">  Element access </span>
</h5>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/at.html" title="cpp/string/basic string/at"> <table><tr><td>at</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">    accesses the specified character with bounds checking <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator_at.html" title="cpp/string/basic string/operator at"> <table><tr><td>operator[]</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   accesses the specified character <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/front.html" title="cpp/string/basic string/front"> <table><tr><td>front</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   accesses the first character <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/back.html" title="cpp/string/basic string/back"> <table><tr><td>back</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   accesses the last character <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/data.html" title="cpp/string/basic string/data"> <table><tr><td>data</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns a pointer to the first character of a string <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/c_str.html" title="cpp/string/basic string/c str"> <table><tr><td>c_str</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns a non-modifiable standard C character array version of the string <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator_basic_string_view.html" title="cpp/string/basic string/operator basic string view"> <table><tr><td>operator basic_string_view</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++17)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns a non-modifiable string_view  into the entire string <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>


<tr>
<td colspan="2"> <h5> <span id="Iterators">  Iterators </span>
</h5>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/begin.html" title="cpp/string/basic string/begin"> <table>
<tr><td>begin</td></tr>
<tr><td>cbegin</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns an iterator to the beginning  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/end.html" title="cpp/string/basic string/end"> <table>
<tr><td>end </td></tr>
<tr><td>cend</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns an iterator to the end  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/rbegin.html" title="cpp/string/basic string/rbegin"> <table>
<tr><td>rbegin</td></tr>
<tr><td> crbegin</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns a reverse iterator to the beginning  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/rend.html" title="cpp/string/basic string/rend"> <table>
<tr><td>rend</td></tr>
<tr><td> crend</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns a reverse iterator to the end  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>


<tr>
<td colspan="2"> <h5> <span id="Capacity">  Capacity </span>
</h5>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/empty.html" title="cpp/string/basic string/empty"> <table><tr><td>empty</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   checks whether the string is empty  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/size.html" title="cpp/string/basic string/size"> <table>
<tr><td>size</td></tr>
<tr><td>length</td></tr>
</table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns the number of characters  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/max_size.html" title="cpp/string/basic string/max size"> <table><tr><td>max_size</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns the maximum number of characters  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/reserve.html" title="cpp/string/basic string/reserve"> <table><tr><td>reserve</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   reserves storage  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/capacity.html" title="cpp/string/basic string/capacity"> <table><tr><td>capacity</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns the number of characters that can be held in currently allocated storage  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/shrink_to_fit.html" title="cpp/string/basic string/shrink to fit"> <table><tr><td>shrink_to_fit</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   reduces memory usage by freeing unused memory  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>


<tr>
<td colspan="2"> <h5> <span id="Operations">  Operations </span>
</h5>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/clear.html" title="cpp/string/basic string/clear"> <table><tr><td>clear</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   clears the contents <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/insert.html" title="cpp/string/basic string/insert"> <table><tr><td>insert</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   inserts characters <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/erase.html" title="cpp/string/basic string/erase"> <table><tr><td>erase</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   removes characters  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/push_back.html" title="cpp/string/basic string/push back"> <table><tr><td>push_back</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   appends a character to the end <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/pop_back.html" title="cpp/string/basic string/pop back"> <table><tr><td>pop_back</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   removes the last character  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/append.html" title="cpp/string/basic string/append"> <table><tr><td>append</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   appends characters to the end <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator%2B%3D.html" title="cpp/string/basic string/operator+="> <table><tr><td>operator+=</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   appends characters to the end <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/compare.html" title="cpp/string/basic string/compare"> <table><tr><td>compare</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   compares two strings <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/starts_with.html" title="cpp/string/basic string/starts with"> <table><tr><td>starts_with</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++20)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   checks if the string starts with the given prefix  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/ends_with.html" title="cpp/string/basic string/ends with"> <table><tr><td>ends_with</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++20)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   checks if the string ends with the given suffix  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/replace.html" title="cpp/string/basic string/replace"> <table><tr><td>replace</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   replaces specified portion of a string <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/substr.html" title="cpp/string/basic string/substr"> <table><tr><td>substr</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   returns a substring <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/copy.html" title="cpp/string/basic string/copy"> <table><tr><td>copy</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   copies characters <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/resize.html" title="cpp/string/basic string/resize"> <table><tr><td>resize</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   changes the number of characters stored  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/swap.html" title="cpp/string/basic string/swap"> <table><tr><td>swap</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   swaps the contents  <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>


<tr>
<td colspan="2"> <h5> <span id="Search">  Search </span>
</h5>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/find.html" title="cpp/string/basic string/find"> <table><tr><td>find</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   find characters in the string <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/rfind.html" title="cpp/string/basic string/rfind"> <table><tr><td>rfind</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   find the last occurrence of a substring <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/find_first_of.html" title="cpp/string/basic string/find first of"> <table><tr><td>find_first_of</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   find first occurrence of characters <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/find_first_not_of.html" title="cpp/string/basic string/find first not of"> <table><tr><td>find_first_not_of</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   find first absence of characters <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/find_last_of.html" title="cpp/string/basic string/find last of"> <table><tr><td>find_last_of</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   find last occurrence of characters <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/find_last_not_of.html" title="cpp/string/basic string/find last not of"> <table><tr><td>find_last_not_of</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   find last absence of characters <br> <span style="color: #008000;font-size: 12.8pt">(public member function)</span> </td>
</tr>


<tr>
<td colspan="2"> <h3 style="padding:1.1em 0 0.2em 0.75em"> <span id="Constants"> Constants</span>
</h3>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/npos.html" title="cpp/string/basic string/npos"> <table><tr><td>npos</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #808080;font-size: 12.8pt">[static]</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   special value. The exact meaning depends on the context <br> <span style="color: #008000;font-size: 12.8pt">(public static member constant)</span> </td>
</tr>
</table>
<h3 style="padding:1.1em 0 0.2em 0.75em"><span id="Non-member_functions">Non-member functions</span></h3>
<table style="background-color:transparent; border-spacing:0; max-width:60em">

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator%2B.html" title="cpp/string/basic string/operator+"> <table><tr><td>operator+</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   concatenates two strings or a string and a char  <br> <span style="color: #008000;font-size: 12.8pt">(function template)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator_cmp.html" title="cpp/string/basic string/operator cmp"> <table>
<tr><td>operator==</td></tr>
<tr><td>operator!=</td></tr>
<tr><td>operator&lt;</td></tr>
<tr><td>operator&gt;</td></tr>
<tr><td>operator&lt;=</td></tr>
<tr><td>operator&gt;=</td></tr>
</table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   lexicographically compares two strings  <br> <span style="color: #008000;font-size: 12.8pt">(function template)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/swap2.html" title="cpp/string/basic string/swap2"> <table><tr><td>std::swap<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">(std::basic_string)</span>
</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   specializes the <span style='font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace'><a href="../algorithm/swap.html" title="cpp/algorithm/swap">std::swap</a></span> algorithm <br> <span style="color: #008000;font-size: 12.8pt">(function template)</span> </td>
</tr>


<tr>
<td colspan="2"> <h5> <span id="Input.2Foutput">  Input/output </span>
</h5>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator_ltltgtgt.html" title="cpp/string/basic string/operator ltltgtgt"> <table>
<tr><td>operator&lt;&lt;</td></tr>
<tr><td>operator&gt;&gt;</td></tr>
</table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   performs stream input and output on strings  <br> <span style="color: #008000;font-size: 12.8pt">(function template)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/getline.html" title="cpp/string/basic string/getline"> <table><tr><td>getline</td></tr></table></a></div></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   read data from an I/O stream into a string <br> <span style="color: #008000;font-size: 12.8pt">(function template)</span> </td>
</tr>


<tr>
<td colspan="2"> <h5> <span id="Numeric_conversions">  Numeric conversions </span>
</h5>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/stol.html" title="cpp/string/basic string/stol"> <table>
<tr><td>stoi</td></tr>
<tr><td>stol</td></tr>
<tr><td>stoll</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   converts a string to a signed integer  <br> <span style="color: #008000;font-size: 12.8pt">(function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/stoul.html" title="cpp/string/basic string/stoul"> <table>
<tr><td>stoul</td></tr>
<tr><td>stoull</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   converts a string to an unsigned integer  <br> <span style="color: #008000;font-size: 12.8pt">(function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/stof.html" title="cpp/string/basic string/stof"> <table>
<tr><td>stof</td></tr>
<tr><td>stod</td></tr>
<tr><td>stold</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   converts a string to a floating point value  <br> <span style="color: #008000;font-size: 12.8pt">(function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/to_string.html" title="cpp/string/basic string/to string"> <table><tr><td>to_string</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   converts an integral or floating point value to <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>string</code>  <br> <span style="color: #008000;font-size: 12.8pt">(function)</span> </td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/to_wstring.html" title="cpp/string/basic string/to wstring"> <table><tr><td>to_wstring</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   converts an integral or floating point value to <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>wstring</code>  <br> <span style="color: #008000;font-size: 12.8pt">(function)</span> </td>
</tr>
</table>
<h3 style="padding:1.1em 0 0.2em 0.75em"><span id="Literals">Literals</span></h3>
<table style="background-color:transparent; border-spacing:0; max-width:60em">

<tr>
<td colspan="2" style="font-size: 12.8pt;line-height: 1em;padding: 0"> <div>Defined in inline namespace <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>std::literals::string_literals</code> </div>
</td>
</tr>

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/operator_q__q_s.html" title='cpp/string/basic string/operator""s'> <table><tr><td>operator""s</td></tr></table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table><tr><td><span style="color: #008000;font-size: 12.8pt">(C++14)</span></td></tr></table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   Converts a character array literal to <code style='background-color:transparent; font-family:"DejaVu Sans Mono", courier, monospace'>basic_string</code>  <br> <span style="color: #008000;font-size: 12.8pt">(function)</span> </td>
</tr>
</table>
<h3 style="padding:1.1em 0 0.2em 0.75em"><span id="Helper_classes">Helper classes</span></h3>
<table style="background-color:transparent; border-spacing:0; max-width:60em">

<tr><td colspan="2" style="height:1px; font-size:1px; background-color: #ccc;"></td></tr>
<tr>
<td style="line-height: 1.2em;padding: 0.2em 0 0.25em 0.75em;white-space: nowrap" width="1px">  <div><table style="padding:0; margin:0; border:none;"><tr>
<td><div style='display:inline-table; padding:0; vertical-align:middle; font-family:DejaVuSansMono, "DejaVu Sans Mono", courier, monospace; font-weight:bold' valign="middle"><a href="basic_string/hash.html" title="cpp/string/basic string/hash"> <table>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::string&gt;</span>
</td></tr>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::u16string&gt;</span>
</td></tr>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::u32string&gt;</span>
</td></tr>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::wstring&gt;</span>
</td></tr>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::pmr::string&gt;</span>
</td></tr>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::pmr::u16string&gt;</span>
</td></tr>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::pmr::u32string&gt;</span>
</td></tr>
<tr><td>std::hash<span style="font-size: 11.2pt;font-weight: normal;line-height: 130%">&lt;std::pmr::wstring&gt;</span>
</td></tr>
</table></a></div></td>
<td><div style="display:inline-table; padding:0; vertical-align:middle" valign="middle"><table>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++11)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++20)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++20)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++20)</span></td></tr>
<tr><td><span style="color: #008000;font-size: 12.8pt">(C++20)</span></td></tr>
</table></div></td>
</tr></table></div>
</td>
<td style="line-height: 1.1em;padding-left: 0.75em;white-space: normal">   hash support for strings  <br> <span style="color: #008000;font-size: 12.8pt">(class template specialization)</span> </td>
</tr>
</table>
<h3 style="padding:1.1em 0 0.2em 0.75em"><span id="Deduction_guides.28since_C.2B.2B17.29"><a href="basic_string/deduction_guides.html" title="cpp/string/basic string/deduction guides">Deduction guides</a><span style="color: #008000;font-size: 12.8pt">(since C++17)</span></span></h3>

<!-- 
NewPP limit report
Preprocessor visited node count: 14704/1000000
Preprocessor generated node count: 17666/1000000
Post‐expand include size: 482635/2097152 bytes
Template argument size: 100948/2097152 bytes
Highest expansion depth: 22/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key mwiki1-mwiki_en_:pcache:idhash:1389-0!*!0!!en!*!* and timestamp 20180120030840 -->
</div>                    <!-- /bodycontent -->
                                        <!-- printfooter -->
                    <div>
                    Retrieved from "<a href="http://en.cppreference.com/mwiki/index.php?title=cpp/string/basic_string&amp;oldid=97050">http://en.cppreference.com/mwiki/index.php?title=cpp/string/basic_string&amp;oldid=97050</a>"                    </div>
                    <!-- /printfooter -->
                                                            <!-- catlinks -->
                    <!-- /catlinks -->
                                                            <div></div>
                    <!-- debughtml -->
                                        <!-- /debughtml -->
                </div>
                <!-- /bodyContent -->
            </div>
        </div>
        <!-- /content -->
        <!-- footer -->
        <!-- /footer -->
        <script>if(window.mw){
mw.loader.state({"site":"loading","user":"missing","user.groups":"ready"});
}</script>
<script src="../../../common/skin_scripts.js"></script>
<script>if(window.mw){
mw.loader.load(["mediawiki.action.view.postEdit","mediawiki.user","mediawiki.page.ready","mediawiki.searchSuggest","mediawiki.hidpi","ext.gadget.ColiruCompiler","ext.gadget.MathJax"], null, true);
}</script>
<script src="../../../common/site_scripts.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2828341-1']);
_gaq.push(['_setDomainName', 'cppreference.com']);
_gaq.push(['_trackPageview']);
</script><!-- Served in 2.505 secs. -->
	</body>
<!-- Cached 20180120030842 -->
</html>
